Skip to main content link. Accesskey S
  • Help
  • HCL Logo
  • HCL Notes and Domino Application Development wiki
  • THIS WIKI IS READ-ONLY. Individual names altered for privacy purposes.
  • HCL Forums and Blogs
  • Home
  • Product Documentation
  • Community Articles
  • Learning Center
  • API Documentation
Search
Community Articles > Integrating Applications > Web Services > Testing your Domino web service provider and consumer using SoapUI.
  • Share Show Menu▼
  • Subscribe Show Menu▼

Recent articles by this author

Installing the C-API toolkit on Mac OSX 10.8.

This wiki article details how to install the C-API toolkit on Mac OSX. Developing at the command line and in Xcode.

Testing your Domino web service provider and consumer using SoapUI.

This walkthrough shows you how to test your Domino web service provider and consumer, using SoapUI.

Creating your first Web Service provider and consumer in LotusScript and Java.

This simple walkthrough will introduce you to create a LotusScript and Java Web Service provider and consumer. This tutorial assumes you have no knowledge of what web services are.

Connecting to a Domino server over SSL in Java, using a self signed certificate.

This walkthrough will detail how to create a self signed certificate, enable SSL on the Domino server and connect to that SSL connection in a Java application.
Community articleTesting your Domino web service provider and consumer using SoapUI.
Added by ~Ted Dwofreekonyettu | Edited by ~Ted Dwofreekonyettu on January 1, 2012 | Version 26
  • Actions Show Menu▼
expanded Abstract
collapsed Abstract
This walkthrough shows you how to test your Domino web service provider and consumer, using SoapUI.
Tags: wsdl soap soapui domino webservices java
ShowTable of Contents
HideTable of Contents
  • 1 Introduction
  • 2 Initial Setup
  • 3 Setting up the SoapUI project
  • 4 Testing the web service provider
  • 5 Testing the web service consumer

Introduction

Any issues that arise from using web services normally can be traced back to the data sent via SOAP. SoapUI is a very powerful application and this walkthrough only covers the basics to capture the SOAP request and response. 

Initial Setup

You will need the following to complete this walkthrough. 

  • Domino server. 
  • Notes Designer. 
  • SoapUI installed (defaults).
  • Completed the "Creating your first Web Service provider and consumer in LotusScript and Java." tutorial. 

 

Setting up the SoapUI project

1. Launch SoapUI. 

 

2. Select the "File -> New Project" menu option. 

 

3. Fill out the following options on the dialog (leave the rest as default). Change SERVER_NAME to match your servers name (eg. localhost, whatever.lan ).

New SoapUI Project

  • Project Name: Test Hello World
  • Initial WSDL/WADL : http://SERVER_NAME/WS.nsf/HWLSP?WSDL
  • Create Requests: SELECTED
  • Create MockService: SELECTED

 

4. Click OK. 

 

5. SoapUI will load in the WSDL file and then display the "Generate MockService" dialog. Click OK. 

 

6. For the "Specify name of MockService to create" dialog just click OK. 

Generate Mock Service window

 

Your project is now created!


Testing the web service provider

1. In SoapUI expand your projects outline and double click the "Request 1" item. 

Request 1 window

 

2. The "Request 1" window will open up and has two sub windows in it. One is the SOAP request and should contain the following code. 

	<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

	xmlns:xsd="http://www.w3.org/2001/XMLSchema"

	xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"

	xmlns:urn="urn:DefaultNamespace">

	   <soapenv:Header/>

	   <soapenv:Body>

	      <urn:HELLO soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">

	         <TXT xsi:type="xsd:string">?</TXT>

	      </urn:HELLO>

	   </soapenv:Body>

	</soapenv:Envelope>

 

The "?" is the value that will be sent to the web service. Change that to "SOAP Test". Like as follows. 

 <TXT xsi:type="xsd:string">SOAP Test</TXT>

 

The second sub window on the right is the SOAP response. It will be blank. 

 

3. Click the run icon (Green Arrow). The SOAP response will show the response sent back by the server. 

Request 1 Run button

 

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"

	xmlns:xsd="http://www.w3.org/2001/XMLSchema"

	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

	xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">

	   <soapenv:Body>

	      <ns1:HELLOResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="urn:DefaultNamespace">

	         <HELLOReturn xsi:type="xsd:string">Hello SOAP Test</HELLOReturn>

	      </ns1:HELLOResponse>

	   </soapenv:Body>

	</soapenv:Envelope>

 


Testing the web service consumer

1. In SoapUI expand your projects outline and double click the "Response 1" item. 

Response 1 window

 

2. Paste in the SOAP response you got from testing the provider in the previous section. 

 

3. Close the "Response 1" window. 

 

4. in the SoapUI outline double click the "DominoSoapBinding MockService". This will open the Mock Service window. 

 

5. Select the settings icon (spanner + screwdriver). 

 

6. Make sure the host is set to your servers name and click OK. The settings in this dialog define the endpoint for your mock provider.

Mock Service Options

 

Translates to:

http://SERVER_NAME:8088/mockDominoSoapBinding

 

7. Click the run button. You will see the message "running on port 8088". 

Mock Service Running

 

8. Open WS.nsf on your server in Domino Designer. 

 

9. Expand the outline and select the Agents item. 

Designer outline

 

10. Select the "TestJava" and copy and paste it. This will create "Copy of TestJava" agent. 

 

11. Open "Copy of TestJava" agent. 

 

12. Open the "JavaAgent.java" file. 

 

13. Just after where stub is created add the following line to the code to define your endpoint (Change SERVER_NAME to your servers name). 

stub.setEndpoint("http://SERVER_NAME:8088/mockDominoSoapBinding");

	

 

The final file should look like this. 

	import lotus.domino.*;

	 

	public class JavaAgent extends AgentBase {

	 

	    public void NotesMain() {

	 

	      try {

	          Session session = getSession();

	          AgentContext agentContext = session.getAgentContext();

	 

	          HwProvider stub = new HwProviderServiceLocator().getDomino();

	          stub.setEndpoint("http://SERVER_NAME:8088/mockDominoSoapBinding");

	      

	          String answer = "" + stub.HELLO("world"); 

	          System.out.println("The answer is : " + answer); 

	 

	      } catch(Exception e) {

	          e.printStackTrace();

	       }

	   }

	}

 

14. Close and save the JavaAgent.java file. 

 

15. Close and save the "Copy of TestJava" agent. 

 

16. Right click on the agent and select "Run". 

 

17. When the agent completes select "Tools -> Show Java Debug Console" menu option. You will see the message "The answer is : Hello SOAP Test" displayed. 

Mock Service response

 

18. Go back to SoapUI and you will that your SOAP request has been logged. Double click it. 

Mock Service Request Captured

 

19. When the message viewer window opens you can see the web service consumers SOAP request which should be like as follows. 

	<?xml version="1.0" encoding="UTF-8"?>
	<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
	xmlns:xsd="http://www.w3.org/2001/XMLSchema"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	 <soapenv:Body>
	  <ns1:HELLO soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="urn:DefaultNamespace">
	   <TXT xsi:type="xsd:string">world</TXT>
	  </ns1:HELLO>
	 </soapenv:Body>
	</soapenv:Envelope>

 


  • Actions Show Menu▼


expanded Attachments (10)
collapsed Attachments (10)
Edit the article to add or modify attachments.
File TypeSizeFile NameCreated OnDelete file
image/x-png 9 KB MockService response.png 1/1/12, 10:20 AM
image/x-png 76 KB NewSoapUIProject.png 1/1/12, 10:23 AM
image/x-png 47 KB generateMockService.png 1/1/12, 10:28 AM
image/x-png 18 KB Request1.png 1/1/12, 10:30 AM
image/x-png 36 KB MockServiceOptions.png 1/1/12, 10:33 AM
image/x-png 18 KB Response1.png 1/1/12, 10:35 AM
image/x-png 24 KB Designer.png 1/1/12, 10:38 AM
image/x-png 34 KB MockServiceRequestCaptured.png 1/1/12, 10:47 AM
image/x-png 15 KB MockServiceRunning.png 1/1/12, 10:49 AM
image/x-png 12 KB Request1Run.png 1/1/12, 10:50 AM
expanded Versions (26)
collapsed Versions (26)
Version Comparison     
VersionDateChanged by              Summary of changes
This version (26)Jan 1, 2012, 11:12:26 AM~Ted Dwofreekonyettu  Minor change
25Jan 1, 2012, 11:12:09 AM~Cheryl Opfreetherader  
24Jan 1, 2012, 11:11:18 AM~Cheryl Opfreetherader  
23Jan 1, 2012, 11:10:28 AM~Cheryl Opfreetherader  
22Jan 1, 2012, 11:05:07 AM~Cheryl Opfreetherader  
21Jan 1, 2012, 11:03:40 AM~Cheryl Opfreetherader  
20Jan 1, 2012, 11:02:23 AM~Cheryl Opfreetherader  
19Jan 1, 2012, 11:01:44 AM~Cheryl Opfreetherader  
18Jan 1, 2012, 11:00:04 AM~Cheryl Opfreetherader  
17Jan 1, 2012, 10:59:00 AM~Cheryl Opfreetherader  
16Jan 1, 2012, 10:56:29 AM~Cheryl Opfreetherader  
15Jan 1, 2012, 10:51:54 AM~Cheryl Opfreetherader  
14Jan 1, 2012, 10:50:49 AM~Cheryl Opfreetherader  
13Jan 1, 2012, 10:39:01 AM~Cheryl Opfreetherader  
12Jan 1, 2012, 10:33:15 AM~Cheryl Opfreetherader  
11Jan 1, 2012, 10:30:12 AM~Cheryl Opfreetherader  
10Jan 1, 2012, 10:23:55 AM~Cheryl Opfreetherader  
9Jan 1, 2012, 10:22:55 AM~Cheryl Opfreetherader  
8Jan 1, 2012, 10:21:02 AM~Cheryl Opfreetherader  
7Jan 1, 2012, 10:19:48 AM~Cheryl Opfreetherader  
6Jan 1, 2012, 10:17:47 AM~Cheryl Opfreetherader  
5Jan 1, 2012, 10:14:20 AM~Cheryl Opfreetherader  
4Jan 1, 2012, 10:12:57 AM~Cheryl Opfreetherader  
3Jan 1, 2012, 10:01:24 AM~Cheryl Opfreetherader  
2Jan 1, 2012, 9:56:22 AM~Cheryl Opfreetherader  
1Jan 1, 2012, 9:52:39 AM~Cheryl Opfreetherader  
expanded Comments (0)
collapsed Comments (0)
Copy and paste this wiki markup to link to this article from another article in this wiki.
Go ElsewhereStay ConnectedAbout
  • HCL Software
  • HCL Digital Solutions community
  • HCL Software support
  • BlogsDigital Solutions blog
  • Community LinkHCL Software forums and blogs
  • About HCL
  • Privacy
  • Accessibility